home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
dev
/
amos
/
AMOS1097.lzh
/
AMOSLIST
/
000052_amos-request@svcs1.digex.net_Fri Oct 3 14:12:58 1997.msg
< prev
next >
Wrap
Internet Message Format
|
1997-11-02
|
3KB
Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
by mail4.access.digex.net (8.8.5/8.8.5) with ESMTP id OAA27663
for <mcox@access.digex.net>; Fri, 3 Oct 1997 14:12:56 -0400 (EDT)
Received: (from daemon@localhost)
by svcs1.digex.net (8.8.5/8.8.5) id KAA13372
for amos-out; Fri, 3 Oct 1997 10:33:17 -0400 (EDT)
Received: from mail4.access.digex.net (mail4.access.digex.net [205.197.247.2])
by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id KAA13369
for <amos-list@svcs1.digex.net>; Fri, 3 Oct 1997 10:33:16 -0400 (EDT)
Received: from relay2.inet.tele.dk (relay2.inet.tele.dk [194.182.149.120])
by mail4.access.digex.net (8.8.5/8.8.5) with SMTP id KAA00207
for <amos-list@access.digex.net>; Fri, 3 Oct 1997 10:33:08 -0400 (EDT)
Received: (qmail 63638 invoked from network); 3 Oct 1997 14:32:55 -0000
Received: from post8.tele.dk (194.239.134.172)
by relay2.inet.tele.dk with SMTP; 3 Oct 1997 14:32:55 -0000
Received: from post8.tele.dk ([194.239.180.85]) by post8.tele.dk
(Netscape Mail Server v2.02) with SMTP id AAB40966;
Fri, 3 Oct 1997 16:32:51 +0200
From: Jens Vang Petersen <top_cat@post8.tele.dk>
To: Peter Falkesand <peter.falkesand@vux.alingsas.se>
CC: amos-list@access.digex.net
Date: Fri, 03 Oct 1997 16:30:34 +0100
Message-ID: <yam7215.1717.1747442928@post8.tele.dk>
In-Reply-To: <199710030432.GAA00597@vux.alingsas.se>
X-Mailer: YAM 1.3.4 [020] - Amiga Mailer by Marcel Beck
Subject: Re: Sorting routine.
MIME-Version: 1.0
Content-Type: text/plain
Status: O
X-Status:
On 03-Okt-97, Peter Falkesand smashed the keyboard with:
>Hi!
>Is there a smooth way to sort 20 variables???
>and not do like this..
>--------------------------------
>If score1_1(1)>score2_1(1)
>Loke S7+40,Leek(S5+20)
>endif
>if score1_2(2)>score2_1(1)
>loke s7+60,leek(s5+40)
>endif
>-------------------------------
*sigh*, that's BIG
>This way makes the program very big..!
>Any soloution anyone????
This is from memory, so might not be perfect:
L=$7FFFFFFF
For A=1 to 20
T=-1 : SN=-1
For B=2 to 20
If SCORE(B)>T and SCORE(B)<L
T=SCORE(B) : SN=B
Endif
Next B
If SN>-1
'SN will hold the index-number of the score
'Put is down where you'd like it to be
'A holds the rating of the score (1=High, 20=Low)
Else
Exit
Endif
L=T
Next A
NOTE: This won't handle two equal scores (I'll lose one of 'em), but that
should not be so hard to handle (Let me know if you got problems with it)
--
Happy greetings, Yours..
__________________________________________________________________________
/_ __/ __ / __ /\ ___\ __ \__ _\ aka. JENS VANG PETERSEN
/ / / /_/ / ____/ \ \___\ __ \ \ \ Nyvej 8, DK-4450 Jyderup, Denmark
/_/ /_____/_/ \_____\_\ \_\ \_\ top_cat@post8.tele.dk
--------------------------------------------------------------------------
Never forget the 'Queen Of Hearts', Diana, Princess Of Wales, 1961->1997
--------------------------------------------------------------------------